import request from '@/utils/request'

// 查询排班列表
export function listClass(query) {
  return request({
    url: '/shiftClass/info/list',
    method: 'get',
    params: query
  })
}

// 查询排班详细
export function getClass(shiftClassId) {
  return request({
    url: '/shiftClass/info/' + shiftClassId,
    method: 'get'
  })
}

// 新增排班
export function addClass(data) {
  return request({
    url: '/shiftClass/info',
    method: 'post',
    data: data
  })
}

// 修改排班
export function updateClass(data) {
  return request({
    url: '/shiftClass/info',
    method: 'put',
    data: data
  })
}

// 删除排班
export function delClass(shiftClassId) {
  return request({
    url: '/station/class/' + shiftClassId,
    method: 'delete'
  })
}

// 导出排班
export function exportClass(query) {
  return request({
    url: '/station/class/export',
    method: 'get',
    params: query
  })
}